﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AccountSite.Master" Inherits="System.Web.Mvc.ViewPage<TimeTableManagement.Entities.Tb_Userlogin>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    LogOn
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Log On</h2>
<%: Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
     %>

<% using (Html.BeginForm("LogOn","Account",FormMethod.Post,new {onsubmit = "return true"}))
   { %>
   <%-- Trung them code o day --%>
   <script type="text/javascript" src="../../Scripts/2.5.3-crypto-md5.js">   </script>
   <script type="text/javascript">
       function encryptpassword() {
           document.getElementById('password').value = Crypto.MD5(document.getElementById('password').value);
       }
   </script>
    <div id="login-box-name" style="margin-top:20px;"><%: Html.LabelFor(m => m.username)%></div>
    <div id="login-box-field" style="margin-top:20px;">
        <input id="username" name="username" class="form-login" title="Username" value="" size="30" maxlength="2048" />
        <%: Html.ValidationMessageFor(m => m.username) %>
    </div>
    <div id="login-box-name"><%: Html.LabelFor(m => m.password) %></div>
    <div id="login-box-field">
        <input  id="password" name="password" type="password" class="form-login" title="Password" value="" size="30" maxlength="2048"/>
        <%: Html.ValidationMessageFor(m => m.password)%>
    </div>
    
<br />
<span class="login-box-options">
    <input id="rememberme" name="rememberme" type="checkbox" value="0"> Remember Me 
    <span style="margin-left:30px;"><%: Html.ActionLink("Forgot password?", "ResetPassword")%></span></span>
<br />
<br />
  <%--  <asp:Button ID="Button1" runat="server" Text="Log On" width="103" height="42" style="margin-left:90px;" />--%>
<button type="submit" style= "margin-left:90px;" onclick="encryptpassword()">Log On</button>
<div><a href="/">Back to home page</a> </div>
<% } %>
</asp:Content>
